package com.taoym.voucher.common.enums;

import lombok.Getter;

/**
 * @coder taoym
 * @datetime 2021/6/4 17:13
 * @desc 订单类型
 */
@Getter
public enum ActivityOrderTypeEnum {

    ELM_WM(3, "#0192ff"),
    ELM_CY(4, "#0192ff"),
    EML_SX(5, "#0192ff"),
    PDD_HF(6, "#f20108"),
    MT_WM(1, "#ffd100"),
    MT_SG(2, "#ffd100"),
    MT_TG(9, "#ffd100"),
    MT_JD(28, "#ffd100"),
    PDD_HCP(11, "#f20108"),
    PDD_XSMS(12, "#f20108"),
    PDD_BYBT(13, "#f20108"),
    PDD_LQZX(14, "#f20108"),
    MT_YX(15, "#ffd100"),
    ;

    private final Integer code;
    private final String color;

    ActivityOrderTypeEnum(Integer code, String color) {
        this.code = code;
        this.color = color;
    }

    public static String getColor(Integer code) {
        for (ActivityOrderTypeEnum value : values()) {
            if (code.equals(value.code)) {
                return value.color;
            }
        }
        return null;
    }
}
